package com.glink.manage.service.Impl;

import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glink.common.util.BaseCommonUtils;
import com.glink.manage.common.Constants;
import com.glink.manage.common.weather.WeatherWanWeiYiYuan;
import com.glink.manage.domain.WeatherBean;
import com.glink.manage.dto.weather.WeatherQueryPlaceNameDTO;
import com.glink.manage.mapper.WeatherMapper;
import com.glink.manage.service.WeatherService;
import com.glink.manage.vo.view.SiteWeatherVO;
import com.glink.manage.vo.weather.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.Objects;

/**
 * @author  qiushaoshan
 * @since 2025-02-19
 */
@Service
@Slf4j
public class WeatherServiceImpl extends ServiceImpl<WeatherMapper, WeatherBean> implements WeatherService {

    @Value("${weather.debug:true}")
    private boolean weatherDebug;

    @Value("${weather.appKey:365E1F167b774114aD9344d37a0a6a75}")
    private String weatherAppKey;

    @Value("${weather.needMoreDay:1}")
    private String needMoreDay;

    @Value("${weather.needIndex:1}")
    private String needIndex;

    @Value("${weather.need3HourForcast:1}")
    private String need3HourForcast;

    @Value("${weather.needAlarm:1}")
    private String needAlarm;

    @Value("${weather.needHourData:1}")
    private String needHourData;

    /**
     * 根据地区code查询天气
     * @param areaCode 地区code
     * @return 天气
     */
    private WeatherGeneralVO findWeather(String areaCode) {
        WeatherQueryPlaceNameDTO placeNameDTO = new WeatherQueryPlaceNameDTO();
        placeNameDTO.setAppKey(weatherAppKey);
        placeNameDTO.setAreaCode(areaCode);
        placeNameDTO.setNeedMoreDay(needMoreDay);
        placeNameDTO.setNeedIndex(needIndex);
        placeNameDTO.setNeed3HourForcast(need3HourForcast);
        placeNameDTO.setNeedAlarm(needAlarm);
        placeNameDTO.setNeedHourData(needHourData);
        return WeatherWanWeiYiYuan.queryWeatherByPlaceName(placeNameDTO);
    }

    /**
     * 根据地区code查询天气
     * @return 天气
     */
    public WeatherGeneralVO findWeatherTest() {

        String str = "{                  \"showapi_res_error\": \"\",                  \"showapi_res_id\": \"67b2fe54fb638c23e1220066\",                  \"showapi_res_code\": 0,                  \"showapi_fee_num\": 1,                  \"showapi_res_body\": {\"f4\":{\"day_wind_power\":\"0-3级 <5.4m/s\",\"night_wind_power\":\"0-3级 <5.4m/s\",\"night_weather_code\":\"01\",\"day_weather\":\"多云\",\"sun_begin_end\":\"07:51|19:14\",\"night_weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"index\":{\"yh\":{\"desc\":\"虽然有点风，不用担心天气来调皮捣乱而影响了兴致。\",\"title\":\"较适宜\"},\"zs\":{\"desc\":\"天气舒适，令人神清气爽的一天，不用担心中暑的困扰。\",\"title\":\"无中暑风险\"},\"cl\":{\"desc\":\"天气不错，空气清新。\",\"title\":\"适宜\"},\"travel\":{\"desc\":\"天气较好，但丝毫不会影响您出行的心情。温度适宜又有微风相伴，适宜旅游。\",\"title\":\"适宜\"},\"comfort\":{\"desc\":\"普遍感觉舒适\",\"title\":\"较好\"},\"beauty\":{\"desc\":\"温湿适宜，最好使用SPF20以上防晒霜打底，建议使用中性保湿型化妆品。\",\"title\":\"防晒\"},\"pj\":{\"desc\":\"您将会感到有些凉意，建议饮用常温啤酒，并少量饮用为好。\",\"title\":\"较不适宜\"},\"dy\":{\"desc\":\"天气条件适宜垂钓，愿您度过愉快的垂钓时光。\",\"title\":\"适宜\"},\"nl\":{\"desc\":\"天气较好，虽然有点风，但仍比较适宜夜生活。\",\"title\":\"较适宜\"},\"pk\":{\"desc\":\"温暖舒适，较适宜放风筝。\",\"title\":\"较适宜\"},\"uv\":{\"desc\":\"紫外线辐射极强，建议涂擦SPF20以上、PA++的防晒护肤品，尽量避免暴露于日光下。\",\"title\":\"很强\"},\"ag\":{\"desc\":\"天气条件不易诱发过敏，除特殊体质外，无需担心过敏问题。\",\"title\":\"不易发\"},\"aqi\":{\"desc\":\"可以正常在户外活动，易敏感人群应减少外出\",\"title\":\"良好\"},\"gj\":{\"desc\":\"天气较好，在这种天气里去逛街，既可畅快地放松身心，又会有很多意外收获，真是无比惬意。\",\"title\":\"适宜\"},\"mf\":{\"desc\":\"空气干燥，出门前要在头发上涂上含防晒和滋润成分的护发品，或备好遮阳帽、遮阳伞，以减轻太阳对头发的直接照射。\",\"title\":\"一般\"},\"ls\":{\"desc\":\"天气不错，适宜晾晒。赶紧把久未见阳光的衣物搬出来吸收一下太阳的味道吧！\",\"title\":\"适宜\"},\"glass\":{\"desc\":\"白天太阳辐射较强，建议佩戴透射比1级且标注UV380-UV400的浅色太阳镜\",\"title\":\"必要\"},\"xq\":{\"desc\":\"天气较好，温度适宜，心情会不错，学习、工作效率较高。\",\"title\":\"较好\"},\"ac\":{\"desc\":\"您将感到很舒适，一般不需要开启空调。\",\"title\":\"较少开启\"},\"sports\":{\"desc\":\"温较低，推荐您进行室内运动。\",\"title\":\"较适宜\"},\"clothes\":{\"desc\":\"建议着厚外套加毛衣等服装。\",\"title\":\"较冷\"},\"hc\":{\"desc\":\"气温低注意及时添衣，小心着凉。\",\"title\":\"较适宜\"},\"wash_car\":{\"desc\":\"较适宜洗车，未来一天无雨，风力较小，擦洗一新的汽车至少能保持一天。\",\"title\":\"较适宜\"},\"cold\":{\"desc\":\"各项气象条件适宜，无明显降温过程，发生感冒机率较低。\",\"title\":\"少发\"}},\"day_weather_code\":\"01\",\"3hourForcast\":[{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"1\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"8时-11时\",\"temperature_max\":\"7\",\"temperature\":\"1\",\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"1\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"11时-14时\",\"temperature_max\":\"12\",\"temperature\":\"7\",\"weather\":\"多云\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"7\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"14时-17时\",\"temperature_max\":\"12\",\"temperature\":\"12\",\"weather\":\"多云\"},{\"wind_direction\":\"西南风\",\"temperature_min\":\"9\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"17时-20时\",\"temperature_max\":\"12\",\"temperature\":\"11\",\"weather\":\"多云\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"7\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"20时-23时\",\"temperature_max\":\"11\",\"temperature\":\"9\",\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"23时-2时\",\"temperature_max\":\"9\",\"temperature\":\"7\",\"weather\":\"晴\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"4\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"2时-5时\",\"temperature_max\":\"7\",\"temperature\":\"6\",\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"3\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"5时-8时\",\"temperature_max\":\"6\",\"temperature\":\"4\",\"weather\":\"多云\"}],\"day\":\"20250220\",\"night_weather\":\"多云\",\"ziwaixian\":\"很强\",\"jiangshui\":\"2%\",\"day_wind_direction\":\"无持续风向\",\"night_wind_direction\":\"无持续风向\",\"night_air_temperature\":\"0\",\"air_press\":\"748 hPa\",\"weekday\":4,\"day_weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"day_air_temperature\":\"15\"},\"remark\":\"\",\"f5\":{\"day_wind_power\":\"0-3级 <5.4m/s\",\"night_wind_power\":\"0-3级 <5.4m/s\",\"night_weather_code\":\"03\",\"day_weather\":\"多云\",\"sun_begin_end\":\"07:50|19:15\",\"night_weather_pic\":\"http://app1.showapi.com/weather/icon/night/03.png\",\"index\":{\"yh\":{\"desc\":\"虽然有点风，不用担心天气来调皮捣乱而影响了兴致。\",\"title\":\"较适宜\"},\"zs\":{\"desc\":\"天气舒适，对易中暑人群来说非常友善。\",\"title\":\"无中暑风险\"},\"cl\":{\"desc\":\"天气不错，空气清新。\",\"title\":\"适宜\"},\"travel\":{\"desc\":\"天气较好，但丝毫不会影响您出行的心情。温度适宜又有微风相伴，适宜旅游。\",\"title\":\"适宜\"},\"comfort\":{\"desc\":\"普遍感觉舒适\",\"title\":\"较好\"},\"beauty\":{\"desc\":\"风力不大，建议用中性保湿型霜类化妆品，无需选用防晒化妆品。\",\"title\":\"保湿\"},\"pj\":{\"desc\":\"您将会感到有些凉意，建议饮用常温啤酒，并少量饮用为好。\",\"title\":\"较不适宜\"},\"dy\":{\"desc\":\"天气条件适宜垂钓，愿您度过愉快的垂钓时光。\",\"title\":\"适宜\"},\"nl\":{\"desc\":\"天气较好，虽然有点风，但仍比较适宜夜生活。\",\"title\":\"较适宜\"},\"pk\":{\"desc\":\"温暖舒适，较适宜放风筝。\",\"title\":\"较适宜\"},\"uv\":{\"desc\":\"属中等强度紫外线辐射天气，建议涂擦SPF高于15、PA+的防晒护肤品，戴帽子、太阳镜。\",\"title\":\"中等\"},\"ag\":{\"desc\":\"天气条件不易诱发过敏，除特殊体质外，无需担心过敏问题。\",\"title\":\"不易发\"},\"aqi\":{\"desc\":\"可以正常在户外活动，易敏感人群应减少外出\",\"title\":\"良好\"},\"gj\":{\"desc\":\"天气较好，在这种天气里去逛街，既可畅快地放松身心，又会有很多意外收获，真是无比惬意。\",\"title\":\"适宜\"},\"mf\":{\"desc\":\"注意不要忽略了秀发的防晒需要含防晒和滋润成分的护发品，以及遮阳帽、遮阳伞，都是很好的选择。\",\"title\":\"适宜\"},\"ls\":{\"desc\":\"天气不错，适宜晾晒。赶紧把久未见阳光的衣物搬出来吸收一下太阳的味道吧！\",\"title\":\"适宜\"},\"glass\":{\"desc\":\"白天太阳辐射较强，建议佩戴透射比1级且标注UV380-UV400的浅色太阳镜\",\"title\":\"必要\"},\"xq\":{\"desc\":\"天气较好，温度适宜，心情会不错，学习、工作效率较高。\",\"title\":\"较好\"},\"ac\":{\"desc\":\"您将感到很舒适，一般不需要开启空调。\",\"title\":\"较少开启\"},\"sports\":{\"desc\":\"温较低，推荐您进行室内运动。\",\"title\":\"较适宜\"},\"clothes\":{\"desc\":\"建议着厚外套加毛衣等服装。\",\"title\":\"较冷\"},\"hc\":{\"desc\":\"气温低注意及时添衣，小心着凉。\",\"title\":\"较适宜\"},\"wash_car\":{\"desc\":\"不宜洗车，未来24小时内有雨，如果在此期间洗车，雨水和路上的泥水可能会再次弄脏您的爱车。\",\"title\":\"不宜\"},\"cold\":{\"desc\":\"各项气象条件适宜，无明显降温过程，发生感冒机率较低。\",\"title\":\"少发\"}},\"day_weather_code\":\"01\",\"3hourForcast\":[{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"3\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"8时-11时\",\"temperature_max\":\"9\",\"temperature\":\"3\",\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"3\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"11时-14时\",\"temperature_max\":\"12\",\"temperature\":\"9\",\"weather\":\"多云\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"9\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"14时-17时\",\"temperature_max\":\"12\",\"temperature\":\"12\",\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"10\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"3-4级\",\"hour\":\"17时-20时\",\"temperature_max\":\"12\",\"temperature\":\"12\",\"weather\":\"多云\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"8\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"20时-23时\",\"temperature_max\":\"12\",\"temperature\":\"10\",\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"7\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/03.png\",\"wind_power\":\"<3级\",\"hour\":\"23时-2时\",\"temperature_max\":\"10\",\"temperature\":\"8\",\"weather\":\"阵雨\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/03.png\",\"wind_power\":\"<3级\",\"hour\":\"2时-5时\",\"temperature_max\":\"8\",\"temperature\":\"7\",\"weather\":\"阵雨\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/03.png\",\"wind_power\":\"<3级\",\"hour\":\"5时-8时\",\"temperature_max\":\"7\",\"temperature\":\"6\",\"weather\":\"阵雨\"}],\"day\":\"20250221\",\"night_weather\":\"阵雨\",\"ziwaixian\":\"中等\",\"jiangshui\":\"4%\",\"day_wind_direction\":\"无持续风向\",\"night_wind_direction\":\"无持续风向\",\"night_air_temperature\":\"1\",\"air_press\":\"749.1 hPa\",\"weekday\":5,\"day_weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"day_air_temperature\":\"15\"},\"hourDataList\":[{\"wind_direction\":\"西南风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"00:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"70%\",\"temperature\":\"4\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"19\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"76\",\"num\":\"37\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"8\",\"pm2_5\":\"20\"},\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"00:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"72%\",\"temperature\":\"4\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"19\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"76\",\"num\":\"37\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"8\",\"pm2_5\":\"20\"},\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"01:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"67%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"74\",\"num\":\"43\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"8\",\"pm2_5\":\"20\"},\"weather\":\"晴\"},{\"wind_direction\":\"南风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"1级\",\"temperature_time\":\"01:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"66%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"74\",\"num\":\"43\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"8\",\"pm2_5\":\"20\"},\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"aqi\":\"25\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"02:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"69%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"25\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"76\",\"num\":\"34\",\"no2\":\"8\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"8\",\"pm2_5\":\"17\"},\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"aqi\":\"25\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/02.png\",\"wind_power\":\"2级\",\"temperature_time\":\"02:30\",\"rain\":\"0.0\",\"weather_code\":\"02\",\"sd\":\"66%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"25\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"76\",\"num\":\"34\",\"no2\":\"8\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"8\",\"pm2_5\":\"17\"},\"weather\":\"阴\"},{\"wind_direction\":\"西风\",\"aqi\":\"24\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/02.png\",\"wind_power\":\"2级\",\"temperature_time\":\"03:00\",\"rain\":\"0.0\",\"weather_code\":\"02\",\"sd\":\"61%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"24\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"76\",\"num\":\"34\",\"no2\":\"8\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"9\",\"pm2_5\":\"10\"},\"weather\":\"阴\"},{\"wind_direction\":\"西风\",\"aqi\":\"24\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"03:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"63%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"24\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"76\",\"num\":\"34\",\"no2\":\"8\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"9\",\"pm2_5\":\"10\"},\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"aqi\":\"25\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"04:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"63%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"25\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"78\",\"num\":\"44\",\"no2\":\"6\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"8\",\"pm2_5\":\"12\"},\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"aqi\":\"25\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"2级\",\"temperature_time\":\"04:30\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"63%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"25\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"78\",\"num\":\"44\",\"no2\":\"6\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"8\",\"pm2_5\":\"12\"},\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"aqi\":\"25\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"3级\",\"temperature_time\":\"05:00\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"59%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"25\",\"pm10\":\"17\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"78\",\"num\":\"47\",\"no2\":\"6\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"16\"},\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"aqi\":\"25\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"2级\",\"temperature_time\":\"05:30\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"63%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"25\",\"pm10\":\"17\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"78\",\"num\":\"47\",\"no2\":\"6\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"16\"},\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"aqi\":\"25\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"2级\",\"temperature_time\":\"06:00\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"62%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"25\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"79\",\"num\":\"51\",\"no2\":\"6\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"aqi\":\"25\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"2级\",\"temperature_time\":\"06:30\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"60%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"25\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"79\",\"num\":\"51\",\"no2\":\"6\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"多云\"},{\"wind_direction\":\"西南风\",\"aqi\":\"22\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"2级\",\"temperature_time\":\"07:00\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"63%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"22\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"70\",\"num\":\"38\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"aqi\":\"22\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"2级\",\"temperature_time\":\"07:30\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"62%\",\"temperature\":\"4\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"22\",\"pm10\":\"16\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"70\",\"num\":\"38\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"多云\"},{\"wind_direction\":\"南风\",\"aqi\":\"24\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"1级\",\"temperature_time\":\"08:00\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"61%\",\"temperature\":\"4\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"24\",\"pm10\":\"14\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"75\",\"num\":\"51\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"11\",\"pm2_5\":\"15\"},\"weather\":\"多云\"},{\"wind_direction\":\"西南风\",\"aqi\":\"24\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"1级\",\"temperature_time\":\"08:30\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"64%\",\"temperature\":\"3\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"24\",\"pm10\":\"14\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"75\",\"num\":\"51\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"11\",\"pm2_5\":\"15\"},\"weather\":\"多云\"},{\"wind_direction\":\"东风\",\"aqi\":\"22\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"1级\",\"temperature_time\":\"09:00\",\"rain\":\"0.0\",\"weather_code\":\"01\",\"sd\":\"70%\",\"temperature\":\"4\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"22\",\"pm10\":\"14\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"69\",\"num\":\"30\",\"no2\":\"16\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"多云\"},{\"wind_direction\":\"东南风\",\"aqi\":\"22\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"09:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"63%\",\"temperature\":\"5\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"22\",\"pm10\":\"14\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"69\",\"num\":\"30\",\"no2\":\"16\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"aqi\":\"22\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"1级\",\"temperature_time\":\"10:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"58%\",\"temperature\":\"6\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"22\",\"pm10\":\"14\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"70\",\"num\":\"26\",\"no2\":\"14\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"15\"},\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"aqi\":\"22\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"3级\",\"temperature_time\":\"10:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"50%\",\"temperature\":\"8\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"22\",\"pm10\":\"14\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"70\",\"num\":\"26\",\"no2\":\"14\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"15\"},\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"aqi\":\"26\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"3级\",\"temperature_time\":\"11:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"49%\",\"temperature\":\"8\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"26\",\"pm10\":\"26\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"77\",\"num\":\"40\",\"no2\":\"13\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"aqi\":\"26\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"3级\",\"temperature_time\":\"11:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"47%\",\"temperature\":\"9\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"26\",\"pm10\":\"26\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"77\",\"num\":\"40\",\"no2\":\"13\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"aqi\":\"28\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"3级\",\"temperature_time\":\"12:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"47%\",\"temperature\":\"9\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"28\",\"pm10\":\"28\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"84\",\"num\":\"52\",\"no2\":\"12\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"aqi\":\"28\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"3级\",\"temperature_time\":\"12:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"43%\",\"temperature\":\"11\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"28\",\"pm10\":\"28\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"84\",\"num\":\"53\",\"no2\":\"12\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"14\"},\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"4级\",\"temperature_time\":\"13:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"38%\",\"temperature\":\"11\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"28\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"91\",\"num\":\"68\",\"no2\":\"9\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"15\"},\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"3级\",\"temperature_time\":\"13:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"34%\",\"temperature\":\"12\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"28\",\"area\":\"丽江\",\"co\":\"0.6\",\"o3\":\"91\",\"num\":\"68\",\"no2\":\"9\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"15\"},\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"3级\",\"temperature_time\":\"14:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"35%\",\"temperature\":\"13\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"24\",\"area\":\"丽江\",\"co\":\"0.5\",\"o3\":\"92\",\"num\":\"69\",\"no2\":\"8\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"12\"},\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"14:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"38%\",\"temperature\":\"12\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"24\",\"area\":\"丽江\",\"co\":\"0.5\",\"o3\":\"92\",\"num\":\"69\",\"no2\":\"8\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"12\"},\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"aqi\":\"30\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"15:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"39%\",\"temperature\":\"12\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"30\",\"pm10\":\"18\",\"area\":\"丽江\",\"co\":\"0.5\",\"o3\":\"94\",\"num\":\"81\",\"no2\":\"9\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"12\"},\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"aqi\":\"30\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"15:30\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"36%\",\"temperature\":\"13\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"30\",\"pm10\":\"18\",\"area\":\"丽江\",\"co\":\"0.5\",\"o3\":\"94\",\"num\":\"81\",\"no2\":\"9\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"12\"},\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"2级\",\"temperature_time\":\"16:00\",\"rain\":\"0.0\",\"weather_code\":\"00\",\"sd\":\"35%\",\"temperature\":\"12\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"25\",\"area\":\"丽江\",\"co\":\"0.5\",\"o3\":\"90\",\"num\":\"73\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"16\"},\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/02.png\",\"wind_power\":\"3级\",\"temperature_time\":\"16:30\",\"rain\":\"0.0\",\"weather_code\":\"02\",\"sd\":\"36%\",\"temperature\":\"12\",\"aqiDetail\":{\"primary_pollutant\":\"\",\"aqi\":\"29\",\"pm10\":\"25\",\"area\":\"丽江\",\"co\":\"0.5\",\"o3\":\"90\",\"num\":\"73\",\"no2\":\"10\",\"o3_8h\":\"_\",\"quality\":\"优质\",\"so2\":\"12\",\"pm2_5\":\"16\"},\"weather\":\"阴\"},{\"wind_direction\":\"西北风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/02.png\",\"wind_power\":\"2级\",\"temperature_time\":\"17:00\",\"rain\":\"0.0\",\"weather_code\":\"02\",\"temperature\":\"13\",\"sd\":\"33%\",\"aqiDetail\":{\"quality\":\"优质\",\"aqi\":\"29\",\"pm10\":\"18\",\"area\":\"丽江\",\"co\":\"0.5\",\"o3\":\"90\",\"num\":\"74\",\"no2\":\"9\",\"o3_8h\":\"_\",\"primary_pollutant\":\"\",\"so2\":\"12\",\"pm2_5\":\"16\"},\"weather\":\"阴\"}],\"f7\":{\"day_wind_power\":\"0-3级 <5.4m/s\",\"night_wind_power\":\"0-3级 <5.4m/s\",\"night_weather_code\":\"01\",\"day_weather\":\"阵雨\",\"sun_begin_end\":\"07:48|19:16\",\"night_weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"index\":{\"yh\":{\"desc\":\"室外有风，有时有降水，但只要做好防雨工作，你仍然可以有一个愉快的约会。\",\"title\":\"较适宜\"},\"zs\":{\"desc\":\"天气舒适，令人神清气爽的一天，不用担心中暑的困扰。\",\"title\":\"无中暑风险\"},\"cl\":{\"desc\":\"有降水，且风力稍大，请尽量避免户外晨练，若坚持晨练请带上雨具。\",\"title\":\"不宜\"},\"travel\":{\"desc\":\"有降水，温度适宜，在细雨中游玩别有一番情调，可不要错过机会呦！但记得出门要携带雨具。\",\"title\":\"适宜\"},\"comfort\":{\"desc\":\"偏凉或凉，部分人感觉不舒适\",\"title\":\"较好\"},\"beauty\":{\"desc\":\"皮肤易缺水，用润唇膏后再抹口红，用保湿型霜类化妆品。\",\"title\":\"保湿\"},\"pj\":{\"desc\":\"您将会感到有些凉意，建议饮用常温啤酒，并少量饮用为好。\",\"title\":\"较不适宜\"},\"dy\":{\"desc\":\"天气不好，不适合垂钓。\",\"title\":\"不宜\"},\"nl\":{\"desc\":\"虽然有风且有降水，但只要提前有所准备，您仍然可以享受夜生活的乐趣。\",\"title\":\"较适宜\"},\"pk\":{\"desc\":\"天气不好，不适宜放风筝。\",\"title\":\"不宜\"},\"uv\":{\"desc\":\"属弱紫外线辐射天气，无需特别防护。若长期在户外，建议涂擦SPF在8-12之间的防晒护肤品。\",\"title\":\"最弱\"},\"ag\":{\"desc\":\"天气条件不易诱发过敏，有降水，特殊体质人群应预防感冒可能引发的过敏。\",\"title\":\"不易发\"},\"aqi\":{\"desc\":\"可以正常在户外活动，易敏感人群应减少外出\",\"title\":\"良好\"},\"gj\":{\"desc\":\"有降水，较不适宜逛街，若坚持出门，请记得带上雨具。\",\"title\":\"较不宜\"},\"mf\":{\"desc\":\"洗发后最好用毛巾把头发吸干，若用吹风机，吹风前记得用适合干性发质的护发素，吹风时保持10cm距离，风的温度不要太高。\",\"title\":\"适宜\"},\"ls\":{\"desc\":\"有降水，可能会淋湿晾晒的衣物，不太适宜晾晒。请随时注意天气变化。\",\"title\":\"不太适宜\"},\"glass\":{\"desc\":\"白天有降水天气，视线较差，不需要佩戴太阳镜\",\"title\":\"不需要\"},\"xq\":{\"desc\":\"有降水，雨水可能会使心绪无端地挂上轻愁，与其因下雨而无精打采，不如放松心情，好好欣赏一下雨景。你会发现雨中的世界是那般洁净温和、清新葱郁。\",\"title\":\"较差\"},\"ac\":{\"desc\":\"您将感到很舒适，一般不需要开启空调。\",\"title\":\"较少开启\"},\"sports\":{\"desc\":\"有降水,推荐您在室内进行休闲运动。\",\"title\":\"较不宜\"},\"clothes\":{\"desc\":\"建议着厚外套加毛衣等服装。\",\"title\":\"较冷\"},\"hc\":{\"desc\":\"天气不好，建议选择别的娱乐方式。\",\"title\":\"不适宜\"},\"wash_car\":{\"desc\":\"不宜洗车，未来24小时内有雨，如果在此期间洗车，雨水和路上的泥水可能会再次弄脏您的爱车。\",\"title\":\"不宜\"},\"cold\":{\"desc\":\"各项气象条件适宜，无明显降温过程，发生感冒机率较低。\",\"title\":\"少发\"}},\"day_weather_code\":\"03\",\"3hourForcast\":[{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"4\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"<3级\",\"hour\":\"8时-11时\",\"temperature_max\":\"8\",\"temperature\":\"4\",\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"4\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/03.png\",\"wind_power\":\"<3级\",\"hour\":\"11时-14时\",\"temperature_max\":\"12\",\"temperature\":\"8\",\"weather\":\"阵雨\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"8\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/03.png\",\"wind_power\":\"<3级\",\"hour\":\"14时-17时\",\"temperature_max\":\"12\",\"temperature\":\"12\",\"weather\":\"阵雨\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"10\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/03.png\",\"wind_power\":\"3-4级\",\"hour\":\"17时-20时\",\"temperature_max\":\"12\",\"temperature\":\"11\",\"weather\":\"阵雨\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"8\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/03.png\",\"wind_power\":\"<3级\",\"hour\":\"20时-23时\",\"temperature_max\":\"11\",\"temperature\":\"10\",\"weather\":\"阵雨\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"8\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"23时-2时\",\"temperature_max\":\"10\",\"temperature\":\"8\",\"weather\":\"多云\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"2时-5时\",\"temperature_max\":\"8\",\"temperature\":\"8\",\"weather\":\"多云\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"5时-8时\",\"temperature_max\":\"8\",\"temperature\":\"6\",\"weather\":\"多云\"}],\"day\":\"20250223\",\"night_weather\":\"多云\",\"ziwaixian\":\"最弱\",\"jiangshui\":\"72%\",\"day_wind_direction\":\"无持续风向\",\"night_wind_direction\":\"无持续风向\",\"night_air_temperature\":\"1\",\"air_press\":\"748.2 hPa\",\"weekday\":7,\"day_weather_pic\":\"http://app1.showapi.com/weather/icon/day/03.png\",\"day_air_temperature\":\"14\"},\"f6\":{\"day_wind_power\":\"0-3级 <5.4m/s\",\"night_wind_power\":\"0-3级 <5.4m/s\",\"night_weather_code\":\"00\",\"day_weather\":\"小雨\",\"sun_begin_end\":\"07:49|19:15\",\"night_weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"index\":{\"yh\":{\"desc\":\"室外有风，而且有降水，会给室外约会带来一些不便，如果外出约会，请一定做好准备。\",\"title\":\"较不适宜\"},\"zs\":{\"desc\":\"天气不热，在炎炎夏日中十分难得，可以告别暑气漫漫啦~\",\"title\":\"无中暑风险\"},\"cl\":{\"desc\":\"有较强降水，风力稍大，请避免户外晨练，建议在室内做适当锻炼，保持身体健康。\",\"title\":\"不宜\"},\"travel\":{\"desc\":\"温度适宜，又有较弱降水和微风作伴，会给您的旅行带来意想不到的景象，适宜旅游，可不要错过机会呦！\",\"title\":\"适宜\"},\"comfort\":{\"desc\":\"普遍感觉舒适\",\"title\":\"较好\"},\"beauty\":{\"desc\":\"天气较冷、空气干燥，用滋润保湿型化妆品，少扑粉，使用润唇膏。\",\"title\":\"滋润保湿\"},\"pj\":{\"desc\":\"您将会感到有些凉意，建议饮用常温啤酒，并少量饮用为好。\",\"title\":\"较不适宜\"},\"dy\":{\"desc\":\"天气不好，不适合垂钓。\",\"title\":\"不宜\"},\"nl\":{\"desc\":\"有风，且有降水，会给您的出行带来很大的不便，建议就近或最好在室内进行夜生活。\",\"title\":\"较不适宜\"},\"pk\":{\"desc\":\"天气不好，不适宜放风筝。\",\"title\":\"不宜\"},\"uv\":{\"desc\":\"属弱紫外线辐射天气，无需特别防护。若长期在户外，建议涂擦SPF在8-12之间的防晒护肤品。\",\"title\":\"最弱\"},\"ag\":{\"desc\":\"天气条件不易诱发过敏，有降水，特殊体质人群应预防感冒可能引发的过敏。\",\"title\":\"不易发\"},\"aqi\":{\"desc\":\"可以正常在户外活动，易敏感人群应减少外出\",\"title\":\"良好\"},\"gj\":{\"desc\":\"有降水，较不适宜逛街，若坚持出门，请带上雨具避免淋雨。\",\"title\":\"较不宜\"},\"mf\":{\"desc\":\"干燥的空气易带走头发的水分并产生静电，以致头发打结发涩，发质变干变脆，失去光泽，最好使用内含滋润成分的洗发露和护发素。\",\"title\":\"适宜\"},\"ls\":{\"desc\":\"有降水，不适宜晾晒。若需要晾晒，请在室内准备出充足的空间。\",\"title\":\"不宜\"},\"glass\":{\"desc\":\"白天有降水天气，视线较差，不需要佩戴太阳镜\",\"title\":\"不需要\"},\"xq\":{\"desc\":\"有降水，雨水可能会使心绪无端地挂上轻愁，与其因下雨而无精打采，不如放松心情，好好欣赏一下雨景。你会发现雨中的世界是那般洁净温和、清新葱郁。\",\"title\":\"较差\"},\"ac\":{\"desc\":\"您将感到很舒适，一般不需要开启空调。\",\"title\":\"较少开启\"},\"sports\":{\"desc\":\"有降水,推荐您在室内进行休闲运动。\",\"title\":\"较不宜\"},\"clothes\":{\"desc\":\"建议着厚外套加毛衣等服装。\",\"title\":\"较冷\"},\"hc\":{\"desc\":\"天气不好，建议选择别的娱乐方式。\",\"title\":\"不适宜\"},\"wash_car\":{\"desc\":\"不宜洗车，未来24小时内有雨，如果在此期间洗车，雨水和路上的泥水可能会再次弄脏您的爱车。\",\"title\":\"不宜\"},\"cold\":{\"desc\":\"各项气象条件适宜，无明显降温过程，发生感冒机率较低。\",\"title\":\"少发\"}},\"day_weather_code\":\"07\",\"3hourForcast\":[{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"6\",\"precip\":\"4.8\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/03.png\",\"wind_power\":\"<3级\",\"hour\":\"8时-11时\",\"temperature_max\":\"9\",\"temperature\":\"6\",\"weather\":\"阵雨\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/07.png\",\"wind_power\":\"<3级\",\"hour\":\"11时-14时\",\"temperature_max\":\"11\",\"temperature\":\"9\",\"weather\":\"小雨\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"9\",\"precip\":\"4.8\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/07.png\",\"wind_power\":\"<3级\",\"hour\":\"14时-17时\",\"temperature_max\":\"11\",\"temperature\":\"11\",\"weather\":\"小雨\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"9\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/07.png\",\"wind_power\":\"3-4级\",\"hour\":\"17时-20时\",\"temperature_max\":\"11\",\"temperature\":\"11\",\"weather\":\"小雨\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"7\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/07.png\",\"wind_power\":\"<3级\",\"hour\":\"20时-23时\",\"temperature_max\":\"11\",\"temperature\":\"9\",\"weather\":\"小雨\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"23时-2时\",\"temperature_max\":\"9\",\"temperature\":\"7\",\"weather\":\"晴\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"2时-5时\",\"temperature_max\":\"7\",\"temperature\":\"6\",\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"4\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"5时-8时\",\"temperature_max\":\"6\",\"temperature\":\"5\",\"weather\":\"晴\"}],\"day\":\"20250222\",\"night_weather\":\"晴\",\"ziwaixian\":\"最弱\",\"jiangshui\":\"85%\",\"day_wind_direction\":\"无持续风向\",\"night_wind_direction\":\"无持续风向\",\"night_air_temperature\":\"1\",\"air_press\":\"747.6 hPa\",\"weekday\":6,\"day_weather_pic\":\"http://app1.showapi.com/weather/icon/day/07.png\",\"day_air_temperature\":\"14\"},\"time\":\"20250217120000\",\"cityInfo\":{\"c4\":\"lijiang\",\"c17\":\"+8\",\"c5\":\"丽江\",\"c0\":\"530700\",\"latitude\":26.903,\"c7\":\"云南\",\"c10\":\"2\",\"c15\":\"2394\",\"c8\":\"china\",\"c2\":\"lijiang\",\"c12\":\"674100\",\"c11\":\"0888\",\"c9\":\"中国\",\"c6\":\"yunnan\",\"c3\":\"丽江\",\"longitude\":100.222,\"c16\":\"AZ9888\",\"c1\":\"101291401\"},\"f2\":{\"day_wind_power\":\"0-3级 <5.4m/s\",\"night_wind_power\":\"0-3级 <5.4m/s\",\"night_weather_code\":\"01\",\"day_weather\":\"多云\",\"sun_begin_end\":\"07:52|19:13\",\"night_weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"index\":{\"yh\":{\"desc\":\"虽然有点风，不用担心天气来调皮捣乱而影响了兴致。\",\"title\":\"较适宜\"},\"zs\":{\"desc\":\"天气舒适，对易中暑人群来说非常友善。\",\"title\":\"无中暑风险\"},\"cl\":{\"desc\":\"天气不错，空气清新。\",\"title\":\"适宜\"},\"travel\":{\"desc\":\"天气较好，但丝毫不会影响您出行的心情。温度适宜又有微风相伴，适宜旅游。\",\"title\":\"适宜\"},\"comfort\":{\"desc\":\"普遍感觉舒适\",\"title\":\"较好\"},\"beauty\":{\"desc\":\"皮肤易缺水，用润唇膏后再抹口红，用保湿型霜类化妆品。\",\"title\":\"保湿\"},\"pj\":{\"desc\":\"您将会感到有些凉意，建议饮用常温啤酒，并少量饮用为好。\",\"title\":\"较不适宜\"},\"dy\":{\"desc\":\"较适合垂钓，但天气稍凉，会对垂钓产生一定的影响。\",\"title\":\"较适宜\"},\"nl\":{\"desc\":\"天气较好，虽然有点风，但仍比较适宜夜生活。\",\"title\":\"较适宜\"},\"pk\":{\"desc\":\"温暖舒适，较适宜放风筝。\",\"title\":\"较适宜\"},\"uv\":{\"desc\":\"属弱紫外线辐射天气，无需特别防护。若长期在户外，建议涂擦SPF在8-12之间的防晒护肤品。\",\"title\":\"最弱\"},\"ag\":{\"desc\":\"天气条件不易诱发过敏，除特殊体质外，无需担心过敏问题。\",\"title\":\"不易发\"},\"aqi\":{\"desc\":\"可以正常在户外活动，易敏感人群应减少外出\",\"title\":\"良好\"},\"gj\":{\"desc\":\"天气较好，在这种天气里去逛街，既可畅快地放松身心，又会有很多意外收获，真是无比惬意。\",\"title\":\"适宜\"},\"mf\":{\"desc\":\"洗发后最好用毛巾把头发吸干，若用吹风机，吹风前记得用适合干性发质的护发素，吹风时保持10cm距离，风的温度不要太高。\",\"title\":\"适宜\"},\"ls\":{\"desc\":\"天气不错，午后温暖的阳光仍能满足你驱潮消霉杀菌的晾晒需求。\",\"title\":\"基本适宜\"},\"glass\":{\"desc\":\"白天太阳辐射较强，建议佩戴透射比1级且标注UV380-UV400的浅色太阳镜\",\"title\":\"必要\"},\"xq\":{\"desc\":\"天气较好，温度适宜，心情会不错，学习、工作效率较高。\",\"title\":\"较好\"},\"ac\":{\"desc\":\"您将感到很舒适，一般不需要开启空调。\",\"title\":\"较少开启\"},\"sports\":{\"desc\":\"温较低，推荐您进行室内运动。\",\"title\":\"较适宜\"},\"clothes\":{\"desc\":\"建议着厚外套加毛衣等服装。\",\"title\":\"较冷\"},\"hc\":{\"desc\":\"气温低注意及时添衣，小心着凉。\",\"title\":\"较适宜\"},\"wash_car\":{\"desc\":\"适宜洗车，未来持续两天无雨天气较好，适合擦洗汽车，蓝天白云、风和日丽将伴您的车子连日洁净。\",\"title\":\"适宜\"},\"cold\":{\"desc\":\"各项气象条件适宜，无明显降温过程，发生感冒机率较低。\",\"title\":\"少发\"}},\"day_weather_code\":\"01\",\"3hourForcast\":[{\"wind_direction\":\"西风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"8时-11时\",\"temperature_max\":\"8\",\"temperature\":\"5\",\"weather\":\"多云\"},{\"wind_direction\":\"西南风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/02.png\",\"wind_power\":\"<3级\",\"hour\":\"11时-14时\",\"temperature_max\":\"9\",\"temperature\":\"8\",\"weather\":\"阴\"},{\"wind_direction\":\"西南风\",\"temperature_min\":\"8\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"14时-17时\",\"temperature_max\":\"9\",\"temperature\":\"9\",\"weather\":\"多云\"},{\"wind_direction\":\"西南风\",\"temperature_min\":\"7\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"17时-20时\",\"temperature_max\":\"9\",\"temperature\":\"9\",\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"20时-23时\",\"temperature_max\":\"9\",\"temperature\":\"7\",\"weather\":\"多云\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"6\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"23时-2时\",\"temperature_max\":\"7\",\"temperature\":\"6\",\"weather\":\"多云\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"2时-5时\",\"temperature_max\":\"6\",\"temperature\":\"6\",\"weather\":\"多云\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/02.png\",\"wind_power\":\"<3级\",\"hour\":\"5时-8时\",\"temperature_max\":\"6\",\"temperature\":\"5\",\"weather\":\"阴\"}],\"day\":\"20250218\",\"night_weather\":\"多云\",\"ziwaixian\":\"最弱\",\"jiangshui\":\"19%\",\"day_wind_direction\":\"无持续风向\",\"night_wind_direction\":\"无持续风向\",\"night_air_temperature\":\"1\",\"air_press\":\"748.1 hPa\",\"weekday\":2,\"day_weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"day_air_temperature\":\"12\"},\"now\":{\"wind_direction\":\"西北风\",\"aqi\":\"29\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/02.png\",\"wind_power\":\"2级\",\"temperature_time\":\"17:00\",\"rain\":\"0.0\",\"weather_code\":\"02\",\"temperature\":\"13\",\"sd\":\"33%\",\"aqiDetail\":{\"quality\":\"优质\",\"aqi\":\"29\",\"pm10\":\"18\",\"area\":\"丽江\",\"co\":\"0.5\",\"o3\":\"90\",\"num\":\"74\",\"no2\":\"9\",\"o3_8h\":\"_\",\"primary_pollutant\":\"\",\"so2\":\"12\",\"pm2_5\":\"16\"},\"weather\":\"阴\"},\"alarmList\":[],\"f3\":{\"day_wind_power\":\"0-3级 <5.4m/s\",\"night_wind_power\":\"0-3级 <5.4m/s\",\"night_weather_code\":\"01\",\"day_weather\":\"多云\",\"sun_begin_end\":\"07:51|19:13\",\"night_weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"index\":{\"yh\":{\"desc\":\"虽然有点风，不用担心天气来调皮捣乱而影响了兴致。\",\"title\":\"较适宜\"},\"zs\":{\"desc\":\"天气舒适，对易中暑人群来说非常友善。\",\"title\":\"无中暑风险\"},\"cl\":{\"desc\":\"天气不错，空气清新。\",\"title\":\"适宜\"},\"travel\":{\"desc\":\"天气较好，但丝毫不会影响您出行的心情。温度适宜又有微风相伴，适宜旅游。\",\"title\":\"适宜\"},\"comfort\":{\"desc\":\"普遍感觉舒适\",\"title\":\"较好\"},\"beauty\":{\"desc\":\"最好用SPF20以上防晒霜打底，使用保湿型化妆品。\",\"title\":\"保湿防晒\"},\"pj\":{\"desc\":\"您将会感到有些凉意，建议饮用常温啤酒，并少量饮用为好。\",\"title\":\"较不适宜\"},\"dy\":{\"desc\":\"较适合垂钓，但天气稍凉，会对垂钓产生一定的影响。\",\"title\":\"较适宜\"},\"nl\":{\"desc\":\"天气较好，虽然有点风，但仍比较适宜夜生活。\",\"title\":\"较适宜\"},\"pk\":{\"desc\":\"温暖舒适，较适宜放风筝。\",\"title\":\"较适宜\"},\"uv\":{\"desc\":\"紫外线辐射极强，建议涂擦SPF20以上、PA++的防晒护肤品，尽量避免暴露于日光下。\",\"title\":\"很强\"},\"ag\":{\"desc\":\"天气条件不易诱发过敏，除特殊体质外，无需担心过敏问题。\",\"title\":\"不易发\"},\"aqi\":{\"desc\":\"可以正常在户外活动，易敏感人群应减少外出\",\"title\":\"良好\"},\"gj\":{\"desc\":\"天气较好，在这种天气里去逛街，既可畅快地放松身心，又会有很多意外收获，真是无比惬意。\",\"title\":\"适宜\"},\"mf\":{\"desc\":\"注意防晒，洗发不宜太勤，建议选用保湿防晒型洗发护发品。出门请戴上遮阳帽或打遮阳伞。\",\"title\":\"一般\"},\"ls\":{\"desc\":\"天气不错，午后温暖的阳光仍能满足你驱潮消霉杀菌的晾晒需求。\",\"title\":\"基本适宜\"},\"glass\":{\"desc\":\"白天太阳辐射较强，建议佩戴透射比1级且标注UV380-UV400的浅色太阳镜\",\"title\":\"必要\"},\"xq\":{\"desc\":\"天气较好，温度适宜，心情会不错，学习、工作效率较高。\",\"title\":\"较好\"},\"ac\":{\"desc\":\"您将感到很舒适，一般不需要开启空调。\",\"title\":\"较少开启\"},\"sports\":{\"desc\":\"温较低，推荐您进行室内运动。\",\"title\":\"较适宜\"},\"clothes\":{\"desc\":\"建议着厚外套加毛衣等服装。\",\"title\":\"较冷\"},\"hc\":{\"desc\":\"气温低注意及时添衣，小心着凉。\",\"title\":\"较适宜\"},\"wash_car\":{\"desc\":\"适宜洗车，未来持续两天无雨天气较好，适合擦洗汽车，蓝天白云、风和日丽将伴您的车子连日洁净。\",\"title\":\"适宜\"},\"cold\":{\"desc\":\"各项气象条件适宜，无明显降温过程，发生感冒机率较低。\",\"title\":\"少发\"}},\"day_weather_code\":\"01\",\"3hourForcast\":[{\"wind_direction\":\"西风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"8时-11时\",\"temperature_max\":\"9\",\"temperature\":\"5\",\"weather\":\"多云\"},{\"wind_direction\":\"西南风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"11时-14时\",\"temperature_max\":\"11\",\"temperature\":\"9\",\"weather\":\"多云\"},{\"wind_direction\":\"西南风\",\"temperature_min\":\"9\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"14时-17时\",\"temperature_max\":\"11\",\"temperature\":\"11\",\"weather\":\"多云\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"8\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"<3级\",\"hour\":\"17时-20时\",\"temperature_max\":\"11\",\"temperature\":\"10\",\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"7\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"20时-23时\",\"temperature_max\":\"10\",\"temperature\":\"8\",\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"23时-2时\",\"temperature_max\":\"8\",\"temperature\":\"7\",\"weather\":\"多云\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"3\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"2时-5时\",\"temperature_max\":\"7\",\"temperature\":\"5\",\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"3\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/01.png\",\"wind_power\":\"<3级\",\"hour\":\"5时-8时\",\"temperature_max\":\"5\",\"temperature\":\"3\",\"weather\":\"多云\"}],\"day\":\"20250219\",\"night_weather\":\"多云\",\"ziwaixian\":\"很强\",\"jiangshui\":\"8%\",\"day_wind_direction\":\"无持续风向\",\"night_wind_direction\":\"无持续风向\",\"night_air_temperature\":\"0\",\"air_press\":\"747.7 hPa\",\"weekday\":3,\"day_weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"day_air_temperature\":\"14\"},\"f1\":{\"day_wind_power\":\"0-3级 <5.4m/s\",\"night_wind_power\":\"0-3级 <5.4m/s\",\"night_weather_code\":\"00\",\"day_weather\":\"晴\",\"sun_begin_end\":\"07:53|19:12\",\"night_weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"index\":{\"yh\":{\"desc\":\"虽然有点风，不用担心天气来调皮捣乱而影响了兴致。\",\"title\":\"较适宜\"},\"zs\":{\"desc\":\"天气舒适，对易中暑人群来说非常友善。\",\"title\":\"无中暑风险\"},\"cl\":{\"desc\":\"天气不错，空气清新。\",\"title\":\"适宜\"},\"travel\":{\"desc\":\"天气较好，温度适宜，是个好天气哦。这样的天气适宜旅游，您可以尽情地享受大自然的风光。\",\"title\":\"适宜\"},\"comfort\":{\"desc\":\"普遍感觉舒适\",\"title\":\"较好\"},\"beauty\":{\"desc\":\"温湿适宜，最好使用SPF20以上防晒霜打底，建议使用中性保湿型化妆品。\",\"title\":\"防晒\"},\"pj\":{\"desc\":\"您将会感到有些凉意，建议饮用常温啤酒，并少量饮用为好。\",\"title\":\"较不适宜\"},\"dy\":{\"desc\":\"天气条件适宜垂钓，愿您度过愉快的垂钓时光。\",\"title\":\"适宜\"},\"nl\":{\"desc\":\"天气较好，虽然有点风，比较适宜夜生活。\",\"title\":\"较适宜\"},\"pk\":{\"desc\":\"天气不错，这种天气去放风筝既可以舒展筋骨，又可放松身心，超然自逸于广袤的天地之间。\",\"title\":\"适宜\"},\"uv\":{\"desc\":\"紫外线辐射极强，建议涂擦SPF20以上、PA++的防晒护肤品，尽量避免暴露于日光下。\",\"title\":\"很强\"},\"ag\":{\"desc\":\"天气条件不易诱发过敏，除特殊体质外，无需担心过敏问题。\",\"title\":\"不易发\"},\"aqi\":{\"desc\":\"可以正常在户外活动，易敏感人群应减少外出\",\"title\":\"良好\"},\"gj\":{\"desc\":\"天气较好，在这种天气里去逛街，既可畅快地放松身心，又会有很多意外收获，真是无比惬意。\",\"title\":\"适宜\"},\"mf\":{\"desc\":\"出门前要在头发上涂上含防晒和滋润成分的护发品，或备好遮阳帽、遮阳伞，以减轻太阳对头发的直接照射。\",\"title\":\"一般\"},\"ls\":{\"desc\":\"天气不错，适宜晾晒。赶紧把久未见阳光的衣物搬出来吸收一下太阳的味道吧！\",\"title\":\"适宜\"},\"glass\":{\"desc\":\"白天天气晴朗，太阳辐射较强，建议佩戴透射比1级且标注UV380-UV400的遮阳镜\",\"title\":\"必要\"},\"xq\":{\"desc\":\"天气较好，空气温润，和风飘飘，美好的天气会带来一天接踵而来的好心情。\",\"title\":\"好\"},\"ac\":{\"desc\":\"您将感到很舒适，一般不需要开启空调。\",\"title\":\"较少开启\"},\"sports\":{\"desc\":\"温较低，推荐您进行室内运动。\",\"title\":\"较适宜\"},\"clothes\":{\"desc\":\"建议着厚外套加毛衣等服装。\",\"title\":\"较冷\"},\"hc\":{\"desc\":\"气温低注意及时添衣，小心着凉。\",\"title\":\"较适宜\"},\"wash_car\":{\"desc\":\"适宜洗车，未来持续两天无雨天气较好，适合擦洗汽车，蓝天白云、风和日丽将伴您的车子连日洁净。\",\"title\":\"适宜\"},\"cold\":{\"desc\":\"各项气象条件适宜，无明显降温过程，发生感冒机率较低。\",\"title\":\"少发\"}},\"day_weather_code\":\"00\",\"3hourForcast\":[{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/01.png\",\"wind_power\":\"<3级\",\"hour\":\"8时-11时\",\"temperature_max\":\"10\",\"temperature\":\"5\",\"weather\":\"多云\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"<3级\",\"hour\":\"11时-14时\",\"temperature_max\":\"13\",\"temperature\":\"10\",\"weather\":\"晴\"},{\"wind_direction\":\"南风\",\"temperature_min\":\"10\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"<3级\",\"hour\":\"14时-17时\",\"temperature_max\":\"13\",\"temperature\":\"13\",\"weather\":\"晴\"},{\"wind_direction\":\"无持续风向\",\"temperature_min\":\"10\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"wind_power\":\"<3级\",\"hour\":\"17时-20时\",\"temperature_max\":\"13\",\"temperature\":\"13\",\"weather\":\"晴\"},{\"wind_direction\":\"西南风\",\"temperature_min\":\"8\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"20时-23时\",\"temperature_max\":\"13\",\"temperature\":\"10\",\"weather\":\"晴\"},{\"wind_direction\":\"西风\",\"temperature_min\":\"7\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"23时-2时\",\"temperature_max\":\"10\",\"temperature\":\"8\",\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"2时-5时\",\"temperature_max\":\"8\",\"temperature\":\"7\",\"weather\":\"晴\"},{\"wind_direction\":\"西北风\",\"temperature_min\":\"5\",\"precip\":\"0.0\",\"weather_pic\":\"http://app1.showapi.com/weather/icon/night/00.png\",\"wind_power\":\"<3级\",\"hour\":\"5时-8时\",\"temperature_max\":\"7\",\"temperature\":\"5\",\"weather\":\"晴\"}],\"day\":\"20250217\",\"night_weather\":\"晴\",\"ziwaixian\":\"很强\",\"jiangshui\":\"0%\",\"day_wind_direction\":\"无持续风向\",\"night_wind_direction\":\"无持续风向\",\"night_air_temperature\":\"1\",\"air_press\":\"749.1 hPa\",\"weekday\":1,\"day_weather_pic\":\"http://app1.showapi.com/weather/icon/day/00.png\",\"day_air_temperature\":\"15\"},\"ret_code\":0}                }                ";

        return JSONObject.parseObject(str, WeatherGeneralVO.class);
    }

    /**
     * 根据地区名称查询地名
     * @param area 要查询的地区名称
     */
    public PlaceNameQueryVO getPlaceName(String area){
        WeatherGeneralVO weatherGeneralVO = WeatherWanWeiYiYuan.queryPlaceName(weatherAppKey, area);

        if(Objects.nonNull(weatherGeneralVO) && weatherGeneralVO.getShowapi_res_code() == 0){
            Object showapiResBody = weatherGeneralVO.getShowapi_res_body();
            if(Objects.nonNull(showapiResBody)){
                JSONObject from = JSONObject.from(showapiResBody);
                return JSONObject.parseObject(from.toString(), PlaceNameQueryVO.class);
            }
        }
        return null;
    }

    /**
     * 根据地名查询地理位置
     * @return 地理位置信息
     */
    private PlaceNameQueryVO getPlaceNameTest(){

        String str = "{                  \"showapi_res_error\": \"\",                  \"showapi_res_id\": \"67b2ff76fb638c23e1a4c7a7\",                  \"showapi_res_code\": 0,                  \"showapi_fee_num\": 1,                  \"showapi_res_body\": {\"list\":[{\"area\":\"丽江\",\"distric\":\"丽江\",\"areaCode\":\"530700\",\"cityInfo\":{\"c4\":\"lijiang\",\"c17\":\"+8\",\"longitude\":100.222,\"c6\":\"yunnan\",\"latitude\":26.903,\"c7\":\"云南\",\"c1\":\"101291401\",\"c8\":\"china\",\"c2\":\"lijiang\",\"c15\":\"2394\",\"c12\":\"674100\",\"c10\":\"2\",\"c5\":\"丽江\",\"c9\":\"中国\",\"c11\":\"0888\",\"c16\":\"AZ9888\",\"c3\":\"丽江\"},\"areaid\":\"101291401\",\"flag\":true,\"prov\":\"云南\"},{\"area\":\"古城\",\"distric\":\"丽江\",\"areaCode\":\"530702\",\"cityInfo\":{\"c4\":\"lijiang\",\"c11\":\"0888\",\"c5\":\"丽江\",\"c6\":\"yunnan\",\"latitude\":26.88,\"c7\":\"云南\",\"c1\":\"101291405\",\"c12\":\"674300\",\"c2\":\"gucheng\",\"c17\":\"+8\",\"c8\":\"china\",\"c10\":\"3\",\"longitude\":100.224,\"c9\":\"中国\",\"c15\":\"2423\",\"c16\":\"AZ9888\",\"c3\":\"古城\"},\"areaid\":\"101291405\",\"flag\":true,\"prov\":\"云南\"},{\"area\":\"宁蒗\",\"areaCode\":\"530724\",\"distric\":\"丽江\",\"cityInfo\":{\"c4\":\"lijiang\",\"c11\":\"0888\",\"longitude\":100.51,\"c6\":\"yunnan\",\"latitude\":27.18,\"c7\":\"云南\",\"c10\":\"3\",\"c12\":\"674300\",\"c2\":\"ninglang\",\"c15\":\"2242\",\"c5\":\"丽江\",\"c1\":\"101291404\",\"c8\":\"china\",\"c3\":\"宁蒗\",\"c9\":\"中国\",\"c16\":\"AZ9888\",\"c17\":\"+8\"},\"areaid\":\"101291404\",\"flag\":true,\"prov\":\"云南\"},{\"area\":\"永胜\",\"areaCode\":\"530722\",\"distric\":\"丽江\",\"cityInfo\":{\"c4\":\"lijiang\",\"c15\":\"2131\",\"longitude\":100.785,\"c6\":\"yunnan\",\"latitude\":26.533,\"c7\":\"云南\",\"c1\":\"101291402\",\"c8\":\"china\",\"c2\":\"yongsheng\",\"c11\":\"0888\",\"c12\":\"674200\",\"c10\":\"3\",\"c3\":\"永胜\",\"c9\":\"中国\",\"c5\":\"丽江\",\"c16\":\"AZ9888\",\"c17\":\"+8\"},\"areaid\":\"101291402\",\"flag\":true,\"prov\":\"云南\"},{\"area\":\"华坪\",\"areaCode\":\"530723\",\"distric\":\"丽江\",\"cityInfo\":{\"c4\":\"lijiang\",\"c11\":\"0888\",\"c5\":\"丽江\",\"c6\":\"yunnan\",\"latitude\":26.656,\"c7\":\"云南\",\"c10\":\"3\",\"c12\":\"617300\",\"c2\":\"huaping\",\"c15\":\"1242\",\"c17\":\"+8\",\"c1\":\"101291403\",\"c8\":\"china\",\"c3\":\"华坪\",\"longitude\":101.249,\"c16\":\"AZ9888\",\"c9\":\"中国\"},\"areaid\":\"101291403\",\"flag\":true,\"prov\":\"云南\"},{\"area\":\"玉龙\",\"distric\":\"丽江\",\"areaCode\":\"530721\",\"cityInfo\":{\"c4\":\"lijiang\",\"c11\":\"0888\",\"c5\":\"丽江\",\"c6\":\"yunnan\",\"latitude\":26.987,\"c7\":\"云南\",\"c1\":\"101291406\",\"c12\":\"674300\",\"c2\":\"yulong\",\"c17\":\"+8\",\"c8\":\"china\",\"c10\":\"3\",\"longitude\":100.205,\"c9\":\"中国\",\"c15\":\"2672\",\"c16\":\"AZ9888\",\"c3\":\"玉龙\"},\"areaid\":\"101291406\",\"flag\":true,\"prov\":\"云南\"}],\"remark\":\"\",\"ret_code\":0}                }";

        WeatherGeneralVO weatherGeneralVO = JSONObject.parseObject(str, WeatherGeneralVO.class);
        if(Objects.nonNull(weatherGeneralVO) && weatherGeneralVO.getShowapi_res_code() == 0){
            Object showapiResBody = weatherGeneralVO.getShowapi_res_body();
            if(Objects.nonNull(showapiResBody)){
                JSONObject from = JSONObject.from(showapiResBody);
                return JSONObject.parseObject(from.toString(), PlaceNameQueryVO.class);
            }
        }
        return null;
    }

    /**
     * 根据地名查询地理位置
     *
     * @param area 地名
     * @return 地理位置
     */
    @Override
    public PlaceNameQueryVO getPlaceNameByArea(String area) {
        PlaceNameQueryVO placeNameQueryVO = null;
        if(weatherDebug){
            placeNameQueryVO = getPlaceNameTest();
        }else{
            placeNameQueryVO = getPlaceName(area);
        }
        return placeNameQueryVO;
    }
    
    /**
     * 根据地区code查询天气
     *
     * @param areaCode 地区code
     * @return 天气信息
     */
    @Override
    @Transactional(value = "transactionManager", propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public SiteWeatherVO findWeatherByAreaCode(String areaCode) {
        // 为了防止请求次数过多，因此同一个地区一小时只请求一次
        WeatherBean weatherBean = this.lambdaQuery()
                .eq(WeatherBean::getAreaCode, areaCode)
                .between(WeatherBean::getCreateTime, DateUtil.beginOfHour(new Date()), DateUtil.endOfHour(new Date()))
                .last(Constants.LAST_SQL).one();
        if(Objects.nonNull(weatherBean)){
            return beanToSiteWeather(weatherBean);
        }else{
            WeatherGeneralVO weatherGeneralVO = null;
            if(weatherDebug) {
                weatherGeneralVO = findWeatherTest();
            }else{
                weatherGeneralVO = findWeather(areaCode);
            }
            if (Objects.nonNull(weatherGeneralVO) && weatherGeneralVO.getShowapi_res_code() == 0) {
                Object showApiResBody = weatherGeneralVO.getShowapi_res_body();
                if (Objects.nonNull(showApiResBody)) {
                    JSONObject from = JSONObject.from(showApiResBody);
                    QueryWeatherPlaceNameVO placeNameVO = JSONObject.parseObject(from.toString(), QueryWeatherPlaceNameVO.class);

                    weatherBean = placeNameVOToBean(placeNameVO);
                }
            }
            
            if(Objects.nonNull(weatherBean)){
                boolean status = save(weatherBean);
                if(status){
                    return beanToSiteWeather(weatherBean);
                }
            }
        }
        
        return null;
    }

    /**
     * 天气转bean
     * @param placeNameVO 天气信息
     * @return 天气实体
     */
    private WeatherBean placeNameVOToBean(QueryWeatherPlaceNameVO placeNameVO){
        WeatherBean weatherBean = null;
        if(Objects.nonNull(placeNameVO)){
            weatherBean = new WeatherBean();
            weatherBean.setObjId(BaseCommonUtils.generateUUID());
            // 今日天气
            if(Objects.nonNull(placeNameVO.getNow())){
                QueryWeatherPlaceNameNowVO now = placeNameVO.getNow();
                weatherBean.setAqi(now.getAqi());
                weatherBean.setSd(now.getSd());
                weatherBean.setTemperature(now.getTemperature());
                weatherBean.setTemperatureTime(now.getTemperature_time());
                weatherBean.setWeather(now.getWeather());
                weatherBean.setWeatherPic(now.getWeather_pic());
                weatherBean.setWindDirection(now.getWind_direction());
                weatherBean.setWindPower(now.getWind_power());
            }

            // 今日天气区间
            if(Objects.nonNull(placeNameVO.getF1())){
                QueryWeatherPlaceNameF1VO f1 = placeNameVO.getF1();
                weatherBean.setDayAirTemperature(f1.getDay_air_temperature());
                weatherBean.setNightAirTemperature(f1.getNight_air_temperature());
            }

            // 城市信息
            if(Objects.nonNull(placeNameVO.getCityInfo())){
                CityInfoVO cityInfo = placeNameVO.getCityInfo();
                weatherBean.setAreaCode(cityInfo.getC0());
                weatherBean.setAreaid(cityInfo.getC1());
                weatherBean.setArea(cityInfo.getC3());
                weatherBean.setDistric(cityInfo.getC5());
                weatherBean.setProv(cityInfo.getC7());
            }

//            weatherBean.setDetailText(JSONObject.from(showApiResBody).toString());
        }
        return weatherBean;
    }
    
    /**
     * bean转天气
     * @param weatherBean 实体
     * @return 天气
     */
    private SiteWeatherVO beanToSiteWeather(WeatherBean weatherBean){
        SiteWeatherVO siteWeatherVO = null;
        if(Objects.nonNull(weatherBean)){
            siteWeatherVO = new SiteWeatherVO();
            // 今日天气
            siteWeatherVO.setAqi(weatherBean.getAqi());
            siteWeatherVO.setSd(weatherBean.getSd());
            siteWeatherVO.setTemperature(weatherBean.getTemperature());
            siteWeatherVO.setTemperatureTime(weatherBean.getTemperatureTime());
            siteWeatherVO.setWeather(weatherBean.getWeather());
            siteWeatherVO.setWeatherPic(weatherBean.getWeatherPic());
            siteWeatherVO.setWindDirection(weatherBean.getWindDirection());
            siteWeatherVO.setWindPower(weatherBean.getWindPower());

            // 今日天气区间
            siteWeatherVO.setDayAirTemperature(weatherBean.getDayAirTemperature());
            siteWeatherVO.setNightAirTemperature(weatherBean.getNightAirTemperature());

            // 城市信息
            siteWeatherVO.setAreaCode(weatherBean.getAreaCode());
            siteWeatherVO.setAreaid(weatherBean.getAreaid());
            siteWeatherVO.setArea(weatherBean.getArea());
            siteWeatherVO.setDistric(weatherBean.getDistric());
            siteWeatherVO.setProv(weatherBean.getProv());
        }
        return siteWeatherVO;
    }
}
